<template>
  <div>
    <h1>姓名：<label v-text="Name"></label></h1>
    <h1>是否红领巾：<span class="class1" v-bind:class="{backred:IsBack}"><label v-if="IsBack">是</label></span></h1>
    <h1>学校星级：<span v-bind:style="{color:SchoolLevel}">aa</span></h1>
  </div>
</template>

<script>
  export default{
    data() {
      return {
        Name: '小明',
        Age: 18,
        School: '光明小学',
        SchoolLevel: 'red',
        IsBack: true
      }
    }
  }
</script>
<style type="text/css">
  class1 {
    padding:20px;
  }
  .backred {
    background-color:red;
  }
</style>
